package Chapter02;

import java.util.Scanner;

public class zuoye7 {
    //7.王菲的期末考试科目有语文，数学，英语，输入三门课成绩，计算平均分和总分。
    public static void main(String[] args) {
       Scanner input = new Scanner(System.in);

        System.out.println("请输入语文的成绩是:");
        double chinese = input.nextDouble();

        System.out.println("请输入数学的成绩是:");
        double mathematics = input.nextDouble();

        System.out.println("请输入英语学的成绩是:");
        double english = input.nextDouble();

        double age;//平均分
        double sum ;//总和
        System.out.println("---------------------------");
        System.out.println("语文\t\t数学\t\t英语");
        System.out.println(chinese+"\t"+mathematics+"\t"+english);

        System.out.println("---------------------------");
        age=chinese + mathematics + english /3;
        System.out.println("3门课的平均分是:"+age);

        sum=chinese + mathematics + english;
        System.out.println("3门课的总和是:"+sum);

    }
}
